const { Model,DataTypes } = require("sequelize");

class Dairy extends Model {
    static init(sequelize) {
        return super.init({
            id: {
                type: DataTypes.INTEGER,
                primaryKey: true,
                autoIncrement: true,
            },
            title: {
                type: DataTypes.STRING,
                allowNull: false,
            },
            content: {
                type: DataTypes.TEXT,
                allowNull: false,
           },
           tag: {
                type: DataTypes.STRING,
                allowNull: false
           }
        },{
            sequelize,
            tableName: 'dairy',
        })
    }
}
module.exports = Dairy;